package com.kepler.social.common.rule;

import com.kepler.social.common.constants.CountryCallingCode;
import com.kepler.social.common.utils.Safes;

import java.util.Objects;

public class SmsRule {

    public static int defaultCcc(Integer countryCallingCode) {
        return isCccValid(countryCallingCode) ? CountryCallingCode.China.code : countryCallingCode;
    }

    public static int defaultCcc() {
        return CountryCallingCode.China.code;
    }

    public static boolean isCccValid(Integer countryCallingCode) {
        return Objects.nonNull(countryCallingCode) && countryCallingCode > 0;
    }

}
